package com.fish.manni;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class EndListener  implements KeyListener {
    @Override
    public void keyTyped(KeyEvent e) {
        String a = KeyEvent.getKeyText(e.getKeyCode());
        // System.out.println("keyTyped"+a);
    }

    @Override
    public void keyPressed(KeyEvent e) {
        String a = KeyEvent.getKeyText(e.getKeyCode());
        if("向上箭头".equals(a)){
            System.exit(0);
        }
        
    }

    @Override
    public void keyReleased(KeyEvent e) {
        String a = KeyEvent.getKeyText(e.getKeyCode());
        // System.out.println("keyReleased"+a);
    }
}
